.main-wrap {
  flex-grow: 1;
}

main {
  height: 100%;
}
.main-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  // width: 100%;
  // max-width: 800px;
  height: 100%;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.chat-list,
.dialogue-wrap,
.chat-title {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.chat-title {
  height: 56px;
  margin-top: 10px;
  padding: 10px 32px 0;
  box-sizing: border-box;

  .ct-text {
    color: #262626;
    height: 40px;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
  }
}

.welcome-wrap {
  .welcome {
    gap: 14px;
    font-size: 24px;
    font-weight: 500;
  }

  .desc {
    color: #404040;
    margin: 10px 0 20px;
    font-size: 14px;
  }
}

.dialogue-wrap {
  width: 100%;
}

.attachment-box {
  .ab-tips {
    color: rgb(82, 82, 82);
    margin: 0 0 4px 18px;
    font-size: 12px;
    line-height: 18px;
  }
}
.attachment-items {
  display: flex;
  gap: 8px;
  padding: 5px 14px 14px;
  .ab-item {
    display: flex;
    align-items: center;

    position: relative;
    width: 206px;
    height: 53px;
    padding: 8px;
    border-radius: 12px;
    background-color: rgb(243, 244, 246);
    box-sizing: border-box;
    cursor: pointer;

    .ab-item-icon {
      width: 32px;
      height: 32px;
      margin-right: 10px;
    }

    .ab-loading {
      // width: 20px;
      // height: 20px;
      .el-loading-spinner {
        top: 0;
        margin-top: 0;
      }
      .el-loading-spinner .circular {
        width: 30px;
        height: 30px;
      }
    }

    .ab-item-info {
      overflow: hidden;
    }

    .abi-info1 {
      color: #262626;
      min-height: 20px;
      margin: 0;
      font-size: 14px;
      font-weight: 500;
      line-height: 20px;
    }

    .abi-info2 {
      margin: 0;
      font-size: 12px;
      line-height: 17px;
    }

    .ab-item-close {
      position: absolute;
      top: 0px;
      right: 0px;

      width: 20px;
      height: 20px;
      line-height: 20px;
      text-align: center;
      font-size: 8px;

      // background-color: #fff;
      // border-radius: 50%;
      // box-shadow: 0 1px 2px rgba(148, 147, 147, 0.25), inset 0 0 0 0.5px #ededed;
      cursor: pointer;
    }
  }
}

.dialogue {
  // height: 112px;
  padding: 10px;
  margin-bottom: 30px;
  border-radius: 24px;
  cursor: text;
  background-color: rgb(243, 244, 246);

  .textarea-wrap {
    display: flex;
    height: 56px;
    max-height: 336px;
    margin: 0 4px;

    #chat-textarea {
      display: block;
      width: 100%;
      height: 100%;
      // min-height: 56px;
      // max-height: 336px;
      font-size: 16px;
      font-family: inherit;
      color: var(--theme-text-3);
      caret-color: var(--theme-text-3);
      word-break: break-word;
      white-space: pre-wrap;
      resize: none;
      border: none;
      outline: none;
      background-color: rgb(243, 244, 246);
      overflow: auto;
    }
  }
}

.mb-btn-groups {
  .mb-input {
    width: 200px;
    .el-input__inner {
      height: 30px;
      line-height: 30px;
    }
  }
}

.mb-btn {
  display: flex;
  justify-content: center;
  align-items: center;

  height: 28px;
  margin-right: 10px;
  padding: 0 7px;
  color: #4c4c4c;
  border: 1px solid rgba(0, 122, 255, 0.15);
  border-radius: 14px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  .mb-icon {
    font-size: 19px;
    width: 19px;
    height: 19px;
    color: currentColor;
  }
  span {
    margin-left: 4px;
  }
  &:hover {
    background-color: #e0e4ed;
  }
}

.mb-btn.btn-primary {
  color: var(--theme-main);
  background-color: #dbeafe;
}

.send,
.upload {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  .upload-icon {
    width: 23px;
    height: 23px;
    margin: auto;
    font-size: 23px;
    svg {
      height: 100%;
    }
  }
  &:not([disabled]):hover {
    background-color: #e0e4ed;
  }
  &.btn-primary {
    background-color: #4d6bfe;
  }
  &.btn-primary:hover {
    background-color: #4d6bfe;
  }
}

.upload-demo {
  display: inline-block;
}

button.send {
  margin-left: 10px;
  border-radius: 50%;
  background-color: rgb(214, 222, 232);
  svg {
    color: #fafafa;
  }
}

.tip-text {
  text-align: center;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  font-size: 12px;
  color: rgb(163, 163, 163);
}

.chat-list-wrap {
  width: 100%;
  margin-bottom: 20px;
  overflow: auto;
  // overflow: hidden;
}

.question {
  padding: 38px 0 40px;
  margin-bottom: 12px;
  text-align: right;
  .question-text {
    display: inline-block;
    max-width: calc(100% - 48px);
    padding: 8px 20px;
    font-size: 16px;
    line-height: 28px;
    color: #262626;
    white-space: pre-wrap;
    word-break: break-word;
    background-color: #eff6ff;
    border-radius: 14px;
  }

  .attachment-items {
    justify-content: flex-end;
    padding-right: 0;
  }
}

.answer {
  flex-wrap: wrap;
  .answer-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;
    margin-right: 16px;
    background-color: #fff;
    border-radius: 50%;
    // box-shadow: 0 0 0 1px #d5e4ff;
  }

  .answer-text {
    width: calc(~'100% - 50px');
    font-size: 16px;
    color: rgb(64, 64, 64);
    line-height: 28px;
    .loading {
      width: 40px;
      height: 42px;
      .el-loading-spinner {
        .circular {
          width: 30px;
          height: 30px;
        }
        .path {
          stroke: var(--theme-main);
        }
      }
    }

    .thoughts-text {
      margin: 0;
      padding: 0 0 0 13px;
      color: #8b8b8b;
      white-space: pre-wrap;
      line-height: 26px;
      font-size: 14px;
    }

    hr {
      background-color: var(--dsr-border-2);
      margin: 32px 0;
    }
  }

  .answer-btns {
    margin-left: 48px;
    margin-top: 12px;
    font-size: 14px;
    color: rgb(64, 64, 64);
    button {
      color: #909090;
      margin: 0 12px 0 0;
      cursor: pointer;
    }
    button.clicked {
      color: #000;
      font-weight: 900;
    }
  }
}

.open-newChart {
  text-align: center;
  margin-bottom: 4px;
  button {
    padding: 2px 14px;
    line-height: 30px;
    font-size: 14px;
    color: var(--theme-main);
    background-color: rgb(219, 234, 254);
    border-radius: 12px;
    cursor: pointer;
    svg {
      vertical-align: middle;
    }
    span {
      margin-left: 12px;
      vertical-align: middle;
    }
  }
}
